import request from '@/utils/request'

// 查询充电站信息列表
export function listchargeStation(query) {
  return request({
    url: '/business/station/list',
    method: 'get',
    params: query
  })
}

// 查询充电站信息详细
export function getchargeStation(stationId) {
  return request({
    url: '/business/station/getInfoById/' + stationId,
    method: 'get'
  })
}

// 新增充电站信息
export function addchargeStation(data) {
  return request({
    url: '/business/station/add',
    method: 'post',
    data: data
  })
}

// 修改充电站信息
export function updatechargeStation(data) {
  return request({
    url: '/business/station/edit',
    method: 'put',
    data: data
  })
}

// 删除充电站信息
export function delchargeStation(stationId) {
  return request({
    url: '/business/station/remove/' + stationId,
    method: 'delete'
  })
}

// 查询充电站信息作为下拉框数据
export function selectChargeStationToSelect() {
  return request({
    url: '/business/station/selectChargeStationToSelect',
    method: 'get'
  })
}
// 充电桩是否展示切换
export function changeShow(params) {
  return request({
    url: '/business/station/changeShow',
    method: 'put',
    params
  })
}

